//
//  ZBDrawingPaintTool.m
//  ZBDrawingTool
//
//  Created by apple on 2018/7/6.
//  Copyright © 2018年 apple. All rights reserved.
//

#import "ZBDrawingPaintTool.h"
@interface  ZBDrawingPaintTool()


@property (nonatomic, strong) ZBDrawingBoard *drawingBoard;
@end


@implementation ZBDrawingPaintTool
/**
 创建画板操作工具
 
 @param drawingView 面板
 @return 操作工具
 */
+ (ZBDrawingPaintTool *)drawingToolWithDrawingBoard:(ZBDrawingBoard *)drawingBoard;
{
    ZBDrawingPaintTool *tool = [[ZBDrawingPaintTool alloc]init];
    tool.drawingBoard = drawingBoard;
    return tool;
}

/**
 * 清除面板操作
 */
- (void)cleanDrawingView
{
    [self.drawingBoard clean];
}

/**
 * 返回上一步面板操作
 */
- (void)undoDrawingView
{
    [self.drawingBoard back];
}

/**
 保存绘画图片到相册
 */
- (void)saveDrawingImageToAlumImage
{
    [self.drawingBoard save];
}


/**
 获取图片
 */
- (UIImage *)getDrawingImage
{
    return [self.drawingBoard getDrawingImage];
}
@end
